From 0ac02d80a94512fc40041393c308f27c7e1c63ad Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Thu, 2 Nov 2006 12:38:54 -0700 Subject: [PATCH] [IA64] Remove ar.rsc save/restore code in HV The patch remove codes which save/restore ar.rsc to/from vcpu->arch.old_rsc when guest doing memory mode switch (virtual -> physical or physical->virtual). Due to HV is transparent to guest, so there is no need to save/restore ar.rsc by HV and guest kernel will do that while switching memory mode. Signed-off-by: Zhang Xin --- xen/arch/ia64/vmx/vmx_phy_mode.c | 4 ---- xen/include/asm-ia64/domain.h | 1 - 2 files changed, 5 deletions(-) diff --git a/xen/arch/ia64/vmx/vmx_phy_mode.c b/xen/arch/ia64/vmx/vmx_phy_mode.c index f2ad493c0c..7655092f43 100644 --- a/xen/arch/ia64/vmx/vmx_phy_mode.c +++ b/xen/arch/ia64/vmx/vmx_phy_mode.c @@ -100,7 +100,6 @@ int mm_switch_table[8][8] = { void physical_mode_init(VCPU *vcpu) { - vcpu->arch.old_rsc = 0; vcpu->arch.mode_flags = GUEST_IN_PHY; } @@ -245,13 +244,11 @@ switch_mm_mode(VCPU *vcpu, IA64_PSR old_psr, IA64_PSR new_psr) case SW_V2P: // printk("V -> P mode transition: (0x%lx -> 0x%lx)\n", // old_psr.val, new_psr.val); - vcpu->arch.old_rsc = regs->ar_rsc; switch_to_physical_rid(vcpu); /* * Set rse to enforced lazy, to prevent active rse save/restor when * guest physical mode. */ - regs->ar_rsc &= ~(IA64_RSC_MODE); vcpu->arch.mode_flags |= GUEST_IN_PHY; break; case SW_P2V: @@ -262,7 +259,6 @@ switch_mm_mode(VCPU *vcpu, IA64_PSR old_psr, IA64_PSR new_psr) * recover old mode which is saved when entering * guest physical mode */ - regs->ar_rsc = vcpu->arch.old_rsc; vcpu->arch.mode_flags &= ~GUEST_IN_PHY; break; case SW_SELF: diff --git a/xen/include/asm-ia64/domain.h b/xen/include/asm-ia64/domain.h index 648eea0636..cfe7c5e9a3 100644 --- a/xen/include/asm-ia64/domain.h +++ b/xen/include/asm-ia64/domain.h @@ -186,7 +186,6 @@ struct arch_vcpu { char hypercall_continuation; //for phycial emulation - unsigned long old_rsc; int mode_flags; fpswa_ret_t fpswa_ret; /* save return values of FPSWA emulation */ struct timer hlt_timer; -- 2.30.2